typecast (someone) in a role

Translations
cantonner quelqu’un dans un rôle
Definitions
To assign someone to a specific role or character in a film, play, or other performance, often based on their previous work or perceived suitability, rather than their versatility or ability to portray different types of characters.